//
//  MysearchPageTableViewCell.m
//  UI_HLJ_Frame
//
//  Created by  毕宏伟 on 15/7/8.
//  Copyright (c) 2015年 毕宏伟. All rights reserved.
//

#import "MysearchPageTableViewCell.h"

@implementation MysearchPageTableViewCell
- (void)dealloc
{
    [_priceLabel release];
    [_titleLabel release];
    [_titleLabel release];
    [_bigImage release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self =[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.backView =[[UIView alloc]init];

        [self.contentView addSubview:self.backView];
        [_backView release];
        
        self.bigImage =[[UIImageView alloc]init];
       
        [self.backView addSubview:self.bigImage];
        [_bigImage release];
        
        
        self.titleLabel = [[UILabel alloc]init];
  
        [self.backView addSubview:self.titleLabel];
        [_titleLabel release];
        
        
        self.addressLabel =[[UILabel alloc]init];
      
        [self.backView addSubview:self.addressLabel];
        [_addressLabel release];
        
        
        self.priceLabel =[[UILabel alloc]init];
       
        [self.backView addSubview:self.priceLabel];
        [_priceLabel release];
    }
    return self;
}


- (void)layoutSubviews
{
    self.backView.frame =CGRectMake(10, 10, self.contentView.frame.size.width-20, self.contentView.frame.size.height-20);
    
    self.bigImage.frame =CGRectMake(0, 0, self.contentView.frame.size.width-20, self.contentView.frame.size.height-80);
    
    self.titleLabel.frame =CGRectMake(0, self.backView.frame.size.height-60, self.backView.frame.size.width, 30);
    
    self.addressLabel.frame=CGRectMake(0, self.backView.frame.size.height-30, self.backView.frame.size.width/2, 30);
    self.addressLabel.font =[UIFont boldSystemFontOfSize:15];
    
    self.priceLabel.frame =CGRectMake(self.backView.frame.size.width/2+10, self.backView.frame.size.height-30, self.backView.frame.size.width/2-10, 30);
    self.priceLabel.textColor =[UIColor redColor];
    self.priceLabel.font =[UIFont boldSystemFontOfSize:20];
    

}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
